import { defineStore } from "pinia";

const store = defineStore('main', {
  persist: {
    enabled: true,
    strategies: [
      {
        key: "site",
        storage: localStorage
      }
    ]
  },
  state: () => {
    return {
      accountInfo: [],
      menuList: [],
      accessToken: '',
      refreshToken: '',
      buttons: []
    }
  },

  getters: {

  },

  actions: {
    //全局赋值菜单数据方法

    iniMenu(menu) {
      console.log(menu);
      this.menuList = menu;
    }
  }
});

export default store